package com.ywk.base.designPattern.proxy.dynamicProxy.cglib;

import com.ywk.base.designPattern.proxy.dynamicProxy.jdk.person.Student;

/**
 * @Author zbh
 * @Date 2023/4/3
 */
public class CglibProxyTest {
    public static void main(String[] args) {
        //生成虚拟代理类的代码，本来虚拟代理子类是看不见的，
        //下面这句话的作用就是把执行过程中cglib增强后的class字节码文件
//        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "D:\\aop");
        CglibProxy proxy = new CglibProxy(new Student("张三"));
        Student student = (Student) proxy.getProxy();
        student.wakeup();
        student.sleep();
    }
}
